/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dpy.appmvdpy.Models.Importers;

import java.io.*;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author ac_psoares
 */
public abstract class Importer<T> {
    
    private File file;
    public RandomAccessFile ffile;    
    protected BufferedReader bReader;
    public Importer()
    {
    
    }
    
    public Importer(File file) 
    {
        try {
           
           FileReader reader = new FileReader(file);
           bReader = new BufferedReader(reader);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Importer.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public abstract List<T> doImport();

    /**
     * @return the file
     */
    public File getFile() {
        return file;
    }

    /**
     * @param file the file to set
     */
    public void setFile(File file) {
       try {
           
           FileReader reader = new FileReader(file);
           bReader = new BufferedReader(reader);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Importer.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
}
